﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using blackhouse.WebNemo.Business.Groups;

namespace blackhouse.WebNemo.Web.Controls {
	public partial class GroupList : System.Web.UI.UserControl {

		#region Fields

		private int queryGroupId = 0;

		#endregion

		#region Event Handlers

		protected override void OnInit(EventArgs e) {
			base.OnInit(e);

			Int32.TryParse(Request.QueryString["groupId"], out this.queryGroupId);
		}

		#endregion

		#region Methods

		protected string DataBound_rptGroups_ExtraCssClass(object group) {
			IGroup cGroup = group as IGroup;
			if (cGroup != null) {
				if (cGroup.Id == this.queryGroupId)
					return " b selected-group";
			}
			return "";
		}

		protected string DataBound_rptGroups_GroupList(object group) {
            throw new NotImplementedException();
            //IGroup cGroup = group as IGroup;
            //if (cGroup != null)
            //    return NemoUrlUtils.GetUrlUtils().GetDisplayRecords(cGroup.Id);
            //return "";
		}

		#endregion

	}
}